# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>

pkgname=libpqxx
pkgver=6.2.4
pkgrel=1
pkgdesc='C++ client API for PostgreSQL'
url='http://pqxx.org/development/libpqxx/'
arch=('x86_64')
license=('custom')
depends=('postgresql-libs>=9.1')
makedepends=('python2' 'xmlto' 'doxygen')
source=(${pkgname}-${pkgver}.tar.gz::https://github.com/jtv/libpqxx/archive/${pkgver}.tar.gz)
sha256sums=('91a295d9e06fc36db5d993970aa1928e053a57ec03bf6284a1c534844ed35ed3')
sha512sums=('d465784b0b3803e53cfbb8d955523f224dc4d416c9c85f743c16ad7691a18733f0f683b3e373ef688814809cba896df1b6eb23a0bae84ef38c85c1ac0ff8dffd')

prepare() {
  cd ${pkgname}-${pkgver}
  sed 's|python|python2|' -i tools/splitconfig
}

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr --enable-shared
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make prefix="${pkgdir}/usr" install
  install -Dm 644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}"
  install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
}

# vim: ts=2 sw=2 et:
